home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / vgagraph.zip / STAT.H < prev    next >
Text File  |  1992-06-10  |  2KB  |  71 lines

  1. /*  stat.h
  2.  
  3.     Definitions used for file status functions
  4.  
  5.     Copyright (c) 1987, 1992 by Borland International
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __STAT_H
  10. #define __STAT_H
  11.  
  12. #if !defined(___DEFS_H)
  13. #include <_defs.h>
  14. #endif
  15.  
  16. #define S_IFMT  0xF000  /* file type mask */
  17. #define S_IFDIR 0x4000  /* directory */
  18. #define S_IFIFO 0x1000  /* FIFO special */
  19. #define S_IFCHR 0x2000  /* character special */
  20. #define S_IFBLK 0x3000  /* block special */
  21. #define S_IFREG 0x8000  /* or just 0x0000, regular */
  22. #define S_IREAD 0x0100  /* owner may read */
  23. #define S_IWRITE 0x0080 /* owner may write */
  24. #define S_IEXEC 0x0040  /* owner may execute <directory search> */
  25.  
  26. struct  stat
  27. {
  28.     short st_dev;
  29.     short st_ino;
  30.     short st_mode;
  31.     short st_nlink;
  32.     int   st_uid;
  33.     int   st_gid;
  34.     short st_rdev;
  35.     long  st_size;
  36.     long  st_atime;
  37.     long  st_mtime;
  38.     long  st_ctime;
  39. };
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. int  _Cdecl _FARFUNC fstat(int __handle, struct stat _FAR *__statbuf);
  45. int  _Cdecl _FARFUNC stat(const char _FAR *__path, struct stat _FAR *__statbuf);
  46.  
  47. #ifdef __MSC
  48. #define _fstat(h,b) fstat(h,b)
  49. #define _stat(p,b)  stat(p,b)
  50. struct  _stat
  51. {
  52.     short st_dev;
  53.     short st_ino;
  54.     short st_mode;
  55.     short st_nlink;
  56.     int   st_uid;
  57.     int   st_gid;
  58.     short st_rdev;
  59.     long  st_size;
  60.     long  st_atime;
  61.     long  st_mtime;
  62.     long  st_ctime;
  63. };
  64. #endif
  65.  
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69.  
  70. #endif  /* __STAT_H */
  71.